package com.thread.blockQueue;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @Author milian
 * @Date 2021/7/29 0029 17:15
 */
public class demo1 {
    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<Object> arrayBlockingQueue = new ArrayBlockingQueue<>(1);
        arrayBlockingQueue.put("张三");
        System.out.println(arrayBlockingQueue.take());
        System.out.println(arrayBlockingQueue.take());
        System.out.println("结束了");
    }
}
